package com.lulu.combination;


import java.util.HashMap;
import java.util.Map;

public class Combination {

    private static final Map<String, TYPE> map = new HashMap<>();

    static {
        map.put("AE", TYPE.AN);
        map.put("BE", TYPE.ML);
        map.put("AD", TYPE.LM);
        map.put("BD", TYPE.TG);
    }

    public enum TYPE {
        AN,//AE 坚守人
        ML,//BE 协调员
        LM,//AD 开路人
        TG //BD 侦查员
    }

    public static class Entity {
        int A, B, C, D, E;

        public Entity(int a, int b, int c, int d, int e) {
            A = a;
            B = b;
            C = c;
            D = d;
            E = e;
        }
    }

    /**
     * 获得我的分类
     */
    public static TYPE getMyType(Entity e) {
        String l, r;
        if (e.A >= e.B) {
            l = "A";
        } else {
            l = "B";
        }
        if (e.E >= e.D) {
            r = "E";
        } else {
            r = "D";
        }
        return map.get(l + r);
    }

    public static void main(String[] args) {
        System.out.println( Combination.getMyType(new Entity(
                1, 2, 3, 4, 5
        )));
    }
}